KitePlayerMediaSession
Mirrors player into Android's media session and routes the buttons back.
That session is what the lock screen, the headset buttons, the car and the media area of the quick settings panel all read. Building one is what every application was writing by hand.
Most apps get one from KitePlayer.attachMediaSession, which also adds the media notification, background handling and audio focus, and closes it all with the player. Built with this constructor, the session is only the session, and the app closes it with the player.
A button press that arrives after the player closed does nothing.
Parameters
how far the skip back and skip forward buttons move, on the lock screen, the notification, a headset and a car. Positive.
Constructors
Properties
Functions
The picture the session shows, over the item's own cover, which shows when this is null and no loader gives one (#425). A loader set with setArtworkLoader replaces it when the media item changes. A picture larger than the system draws it is scaled down once to that size.
Loads the picture for each media item, so the application does not have to watch the player.
Buttons of the application's own, such as a like or a shuffle button, in the order given.
The activity to open from the system media controls, usually the player screen. The media notification sets its content intent here too.